﻿<ul class="vacationUl">
    <li>
        <div class="frame_title">我的请假</div>
        <div class="frame_btn">请假</div>
    </li>
    <li>
        <table>
            <tbody>
                <tr class="td_head" height="45">
                    <td>开始时间</td>
                    <td>结束时间</td>
                    <td>请假天数</td>
                    <td>请假原因</td>
                    <td>状态</td>
                    <td>操作</td>
                </tr>
                @if (Model != null)
                {
                    var i = 0;
                    foreach (var item in Model)
                    {
                        var timeSpan = @item.EndTime - @item.StartTime;
                        <tr height="40">
                            <td>@item.StartTime</td>
                            <td>@item.EndTime</td>
                            <td>@timeSpan.Days</td>
                            <td>@item.VacationType.Name</td>
                            <td>
                                待审批
                            </td>
                            @if (item.State != "待审批")
                            {
                                <td>
                                    <a href="javascript:;" onclick="window.open('@Url.Action("Details_Vacation", "Study", new { id=item.ID })', '', 'height=500,width=820,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,left=200,top=100,resizable=yes');">详情</a>
                                </td>
                            }
                            else
                            {
                                <td>
                                    <a href="javascript:;" onclick="window.open('@Url.Action("Details_Vacation", "Study", new { id=item.ID })', '', 'height=500,width=820,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,left=200,top=100,resizable=yes');">详情</a>
                                    <a href="javascript:;" onclick="edit_click(25)"> 修改</a>
                                    <a href="javascript:delete_data(25);"> 删除</a>
                                </td>
                            }
                        </tr>
                    }
                }
            </tbody>
        </table>
    </li>
</ul>